#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>

#define UINT8_MIN (0)
#define UINT16_MIN (0)
#define UINT32_MIN (0)
#define FLOAT_MIN (-1.f)
#define FLOAT_MAX (15.f)

#define WRITE(a) { if (!fwrite (&a, sizeof (a), 1, stdout)) \
      { fprintf (stderr, "write failure\n"); exit (-1); } }
#define WRITE_TYPE(type, TYPE) { type a; a = TYPE ## _MIN; WRITE (a); \
    a = TYPE ## _MAX; WRITE (a); }

int
main ()
{
  char *msg = "hello salute";

  WRITE_TYPE (uint8_t, UINT8);
  WRITE_TYPE (uint16_t, UINT16);
  WRITE_TYPE (uint32_t, UINT32);

  WRITE_TYPE (int8_t, INT8);
  WRITE_TYPE (int16_t, INT16);
  WRITE_TYPE (int32_t, INT32);

  putchar ('h');

  WRITE_TYPE (float, FLOAT);

  puts(msg);

  return 0;
}
